import Vue from 'vue';
import App from './App.vue';
import router from "@/router";
import store from "@/store";
import toast from "@/components/common/toast";
import VueLazyLoad from "vue-lazyload";
import FastClick from 'fastclick';
import getFontSize from "@/rem";

Vue.config.productionTip = false;

Vue.prototype.$bus = new Vue();

const errorImage = require('./assets/img/common/errorImg.png');
const loadImage = require('./assets/img/common/lazyLoadImg.gif');

//全局插件-提示
Vue.use(toast);
//全局插件-懒加载
Vue.use(VueLazyLoad, {
  preLoad: 1.3,
  error: errorImage,
  loading: loadImage,
  attempt: 1
});
//全局插件-fastclick
FastClick.attach(document.body);
//媒体查询获取root-font-size
(getFontSize)()

new Vue({
  render: h => h(App),
  router,
  store
}).$mount('#app')
